package com.songhuan.web.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.songhuan.web.entity.Enums;
import com.songhuan.web.tools.dto.BaseDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 请假记录类
 */
@Data
public class LeaveRecordDto extends BaseDto {

    /**
     * 用户
     */

    @JsonProperty("UserId")
    private Integer UserId;
    /**
     * 班级
     */

    @JsonProperty("OrganizationId")
    private Integer OrganizationId;
    /**
     * 原因
     */

    @JsonProperty("Reason")
    private String Reason;
    /**
     * 审核人
     */

    @JsonProperty("AuditUserId")
    private Integer AuditUserId;
    /**
     * 审核状态
     */

    @JsonProperty("AuditStatus")
    private Integer AuditStatus;

    public String getAuditStatusFormat() {
        return Enums.AuditStatus.GetEnum(AuditStatus).toString();
    }

    private String AuditStatusFormat;

    /**
     * 回复内容
     */
    @JsonProperty("Reply")
    private String Reply;

    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @JsonProperty("BeginTime")
    private LocalDate BeginTime;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonProperty("EndTime")
    private LocalDateTime EndTime;

    @JsonProperty("ImageUrls")
    private String ImageUrls;

    @JsonProperty("AuditUserDto")
    private AppUserDto AuditUserDto;

    @JsonProperty("OrganizationDto")
    private OrganizationDto OrganizationDto;

    @JsonProperty("UserDto")
    private AppUserDto UserDto;

    @JsonProperty("CheckSettingId")
    @TableField("CheckSettingId")
    private Integer CheckSettingId;

}
